home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
self
/
contrib.lha
/
contrib
/
SelfNews
/
fabrication.self
next >
Wrap
Text File
|
1993-07-24
|
3KB
|
110 lines
" File fabrication.self
created by Ian Wilkinson on Thu Sep 17 14:32:47 1992
Copyright (c) Canon Research Centre Europe, 1992.
All rights reserved."
traits applications visualiser _AddSlotsIfAbsent: ( | ^ fabrication = () | )
traits fabrication _Define: ( |
_ parent* = traits clonable.
^ construction = (
representationObject: postScriptMachine fashionReprObject.
postScriptMachine sendPS: appearance.
representationBehaviour: postScriptMachine fashionAspects: aspects.
postScriptMachine sendPS: (representationObject printString,
' ', representationBehaviour printString, ' ', instantiate) asString
).
^ affect: action = (
postScriptMachine affect: representationObject With: action
).
^ behaviourFor: obj On: evt Is: action = (
postScriptMachine behaviourFor: obj
WithReprObj: representationObject
On: (representationBehaviour + evt) - 1
Is: action
)
| )
prototypes visualiser _AddSlotsIfAbsent: ( | ^ fabrication = () | )
fabrication _Define: ( |
^ parent* <- traits fabrication.
^ representationObject.
^_ representationBehaviour.
^ aspects <- 0.
^ appearance <- ''.
^ instantiate <- ''
| )
traits applications visualiser _AddSlotsIfAbsent: ( | ^ fabricateTEdit = () | )
traits fabricateTEdit _Define: ( |
_ parent* = traits clonable.
^ on: tEditView Media: w = ( copy initialize: tEditView Media: w ).
_ initialize: tEditView Media: w = (
media: w.
accessibleMedia: postScriptMachine fashionReprObject.
representationObject: tEditView.
media send: ('
currentfile ', accessibleMedia printString,
' shareddict /MessageMachine get setfileinputtoken ',
representationObject printString, ' getfileinputtoken
') asString.
objectBehaviour: dictionary copyRemoveAll.
self
).
^ construction = (
listener: (process copySend:
message copy receiver: self Selector: 'mediaTalk') resume
).
^ mediaTalk = ( | postScriptInput |
postScriptInput:
unixFile copyFd: media fileDescriptor Name: 'media'.
[
postScriptInput suspend.
media messageOnWire ifTrue: [ messageTarget ].
process this yield
] loop
).
_ messageTarget = ( | tg |
[
tg: media peekTag.
(tg < 0) ifTrue: [ warning: 'Media difficulty in tEdit.' ].
(tg = 0)
ifTrue: [ "" ]
False: [
(objectBehaviour includesKey: tg)
ifTrue: [ (objectBehaviour at: tg) send ]
False: [ media readTag ]
]
] untilFalse: [ media messageOnWire ]
).
^ behaviourFor: obj On: evt Is: action = (
objectBehaviour at: evt Put: message copy receiver: obj Selector: action
)
| )
prototypes visualiser _AddSlotsIfAbsent: ( | ^ fabricateTEdit = () | )
fabricateTEdit _Define: ( |
^ parent* <- traits fabricateTEdit.
^ representationObject.
^_ representationBehaviour.
^ aspects <- 0.
^ appearance <- ''.
^ instantiate <- ''.
^ media.
^ accessibleMedia.
"_" listener.
_ objectBehaviour
| )